import { DEFAULT_LAYOUT } from '../base';
import { type AppRouteRecordRaw } from '../types';
import i18n from '@/settings/i18n';
import { IconTool } from "@arco-design/web-vue/es/icon";

const routes: AppRouteRecordRaw = {
  path: '/direction',
  redirect: '/direction/journalism',
  component: DEFAULT_LAYOUT,
  meta: {
    title: i18n.global.t('settings.menu.direction.title'),
    icon: IconTool,
    order: 100,
    roles: ['editor'],
  },
  children: [
    {
      path: 'journalism/index',
      component: () => import('@/settings/views/journalism/index.vue'),
      meta: {
        title: i18n.global.t('settings.menu.direction.journalism.index'),
      },
    },
    // {
    //   path: 'journalism/add',
    //   component: () => import('@/settings/views/journalism/add-edit.vue'),
    //   meta: {
    //     title: i18n.global.t('settings.menu.direction.journalism.add'),
    //     hideInMenu: true,
    //     ignoreCache: true,
    //     activeMenu: '/direction/journalism/index',
    //   },
    // },
    // {
    //   path: 'journalism/edit/:id',
    //   component: () => import('@/settings/views/journalism/add-edit.vue'),
    //   props: true,
    //   meta: {
    //     title: i18n.global.t('settings.menu.direction.journalism.edit'),
    //     hideInMenu: true,
    //     ignoreCache: true,
    //     activeMenu: '/direction/journalism/index',
    //   },
    // },

    {
      path: 'column/listing/index',
      component: () => import('@/settings/views/column/listing/index.vue'),
      meta: {
        title: i18n.global.t('settings.menu.direction.column.listing.index'),
      },
    },
    {
      path: 'column/listing/add',
      component: () => import('@/settings/views/column/listing/add-edit.vue'),
      meta: {
        title: i18n.global.t('settings.menu.direction.column.index.add'),
        hideInMenu: true,
        ignoreCache: true,
        activeMenu: '/direction/column/listing/index',
      },
    },
    {
      path: 'column/listing/edit/:id',
      component: () => import('@/settings/views/column/listing/add-edit.vue'),
      props: true,
      meta: {
        title: i18n.global.t('settings.menu.direction.column.index.edit'),
        hideInMenu: true,
        ignoreCache: true,
        activeMenu: '/direction/column/listing/index',
      },
    },

    {
      path: 'column/detail/index/:id',
      component: () => import('@/settings/views/column/detail/index.vue'),
      props: true,
      meta: {
        title: i18n.global.t('settings.menu.direction.column.detail.index'),
        hideInMenu: true,
        ignoreCache: true,
        activeMenu: '/direction/column/listing/index',
      },
    },

    {
      path: 'tag/index',
      component: () => import('@/settings/views/tag/index.vue'),
      meta: {
        title: i18n.global.t('settings.menu.direction.tag.index'),
      },
    },

    {
      path: 'repository/index',
      component: () => import('@/settings/views/repository/index.vue'),
      meta: {
        title: i18n.global.t('settings.menu.direction.repository.index'),
      },
    },
    {
      path: 'repository/application',
      component: () => import('@/settings/views/repository/application.vue'),
      meta: {
        title: i18n.global.t('settings.menu.direction.repository.application'),
        hideInMenu: true,
        activeMenu: '/direction/repository/index',
      },
    },

    {
      path: 'organization/index',
      component: () => import('@/settings/views/organization/index.vue'),
      meta: {
        title: i18n.global.t('settings.menu.direction.organization.index'),
      },
    },
    {
      path: 'organization/application',
      component: () => import('@/settings/views/organization/application.vue'),
      meta: {
        title: i18n.global.t('settings.menu.direction.organization.application'),
        hideInMenu: true,
        activeMenu: '/direction/organization/index',
      },
    },

    {
      path: 'comment/index',
      component: () => import('@/settings/views/comment/index.vue'),
      meta: {
        title: i18n.global.t('settings.menu.direction.comment.index'),
      },
    },
  ],
};

export default routes;
